#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Date          : 2024/10/4
@File          : pandas_start_one.py
@Author        : liwei68
@Description   : 
"""

import matplotlib.pyplot as plt
import pandas as pd
df = pd.read_excel('team.xlsx') # 文件在notebook文件同一目录下

file_path_out = 'team_out.xlsx'
# groupby 分组，sum求和，reset_index重置索引
# 注意 此处如果不重置索引，df中将会没有groupBy的字段
# 各组人数对比
df.groupby('team').count().Q1.plot.pie()


plt.savefig('team_pie.png')